

include ../Makefile.clib

OBJECT = json_reader.o json_writer.o json_value.o
TARGET = $(CLIB_HOME)/lib/libclib_json.a
SAMPLE = sample

all:  $(OBJECT) $(TARGET) $(SAMPLE)

$(TARGET): $(OBJECT)
	@$(AR) $(TARGET) $(OBJECT)
	@ranlib $(TARGET)
	@echo $@

.cpp.o:
	@$(CC) $(CFLAGS)  -c  $< $(INC_CLIB)
	@echo $@
	
sample: sample.cpp
	@$(CC) $(CFLAGS) -o $(SAMPLE) $(SAMPLE).cpp  $(INC_CLIB)  -L$(CLIB_HOME)/lib/  -lclib_json
	@echo $(SAMPLE)

	
clean:
	rm -f *.o
	rm -f $(TARGET)
	rm -f $(SAMPLE)

